package main

import (
	"strconv"
)

// stconv

func main() {
	// 字符串解析成对应数据
	str := "10000"
	//ret := int32(200)
	i := int32(2316)
	//ret2 := string(i)
	//ret2 = fmt.Sprintf("%d", i)
	//fmt.Println(str, ret, ret2)
	ret1, err := strconv.ParseInt(str, 10, 64)
	if err != nil {
		return
	}
	println(ret1)
	retInt, _ := strconv.Atoi(str) // 字符串转换成int
	println(retInt)
	ret3 := strconv.Itoa(i)
	println(ret3)
	ret4 := strconv.ParseBool(ret3) // 字符串中解析Bool
	floats := "1.234"
	ret3 := strconv.ParseFloat(floats, 64)
}
